package com.hunt.service.app.impl;

import com.hunt.dao.StockHolderMapper;
import com.hunt.model.app.StockHolder;
import com.hunt.service.app.StockHolderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
@Transactional
public class StockHolderServiceImpl implements StockHolderService {

    @Autowired
    private StockHolderMapper stockHolderMapper;

    @Override
    public StockHolder findStockHolderByStockCode(String stockCode) {
        StockHolder stockHolder=null;
        stockHolder=stockHolderMapper.findStockHolderByStockCode(stockCode);
        if(stockHolder==null){
            stockHolder=stockHolderMapper.findStockHolderByStockCode1(stockCode);
        }
        if(stockHolder==null){
            stockHolder=stockHolderMapper.findStockHolderByStockCode2(stockCode);
        }
        return stockHolder;
    }
}
